<?php


/**
 * WgGoodsType class.
**/
// class WgGoodsType extends EMongoEmbeddedDocument {
class WgGoodsType extends MrMongoDocument {
	public $gtId;
	public $typeName;
	public $sonTypes;
	
	  /**
  * This method have to be defined in every Model
  * @return string MongoDB collection name, witch will be used to store documents of this model
  */
  public function getCollectionName() {
    return 'WgGoodsType';
  }
  
    /**
   * This method have to be defined in every model, like with normal CActiveRecord
   */
  public static function model($className = __CLASS__) {
    return parent :: model($className);
  }
  
	public static function findByGtId($gtId){
		return self::model()->findByAttributes(array('gtId'=>$gtId));
	}
	public static function findAllObject(){
		return self::model()->findAll();
	}
  
	
}
?>